package com.imooc.demo.dao;

import com.imooc.demo.dto.OrderInfo;
import com.imooc.demo.entity.Order;

import com.imooc.demo.enums.OrderStatusEnum;
import java.util.List;

import static com.imooc.demo.enums.OrderStatusEnum.CANCEL;

public interface OrderDao {

    List<Order> findOrderDetail(String orderId);
    //查找对应的订单
    List<Order> findOrderByOrderId(String orderId);
    //List<Order> findByBuyerOpenid3(String buyerOpenid,,String orderId);

    //创建订单
    boolean orderInsert(Order order);
    //查询订单列表
    List<Order> findOrderByOpenid(String buyerOpenid ,Integer orderStatus);
    //接单
    boolean jieDan(Order order);

    //已完成
    boolean finish(Order order);
    //已取消
    boolean cancel(Order order);

    ///根据地址查订单
    List<Order> findOrderByAddressArea(String addressArea ,String addressDetail ,Integer category10Id);
    List<OrderInfo> getAllOrderInfo(String addressArea ,String addressDetail,Integer category10Id);

    ///根据工匠查订单
   // List<Order> findOrderByWorker(Integer workerId,Integer orderStatus);
    List<Order> findOrderByWorker(String openid,Integer orderStatus);
    //工匠取消订单
    boolean workercancel(Order order);


    //查找某人所有订单
    List<Order> findAllOrderByOpenid(String buyerOpenid);


    ////////
    List<Order> personOrder(String buyerOpenid ,Integer orderStatus);
    /////评分
    boolean setPingFen(Order order);
    List<Order> getAllPingFen();








}
